<?php
       include "admin_goods.php";

       $id=$_REQUEST['id'];
       $popularity=$_REQUEST['popularity']+1;
       var_dump($popularity);
       
       mysqli_select_db($conn,"shopping");
           //SQL模板
           $sql = "update goods set popularity='$popularity' where id='$id'";  
       
          $result=mysqli_query($conn,$sql);
       
            
           if (!$result){
               echo '数据更新失败！';
           }else{
               echo '数据更新成功！';
           }
           
           mysqli_close($conn);
?>
